package com.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.until.DateFormatSerializer;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Stores implements Serializable {
    private Integer storesId;
    private String storesName;
    private String storesAddress;
    private String headName;
    private String headPhone;
    private String empNum;
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date startDate;
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date closeDate;

    private Integer status;

    @JsonSerialize(using = DateFormatSerializer.class)
    public Date getStartDate() {
        return startDate;
    }
    @JsonSerialize(using = DateFormatSerializer.class)
    public Date getCloseDate() {
        return closeDate;
    }
}
